package com.atguigu.utils;

import lombok.Data;

@Data
public class Result {
    private int code=200;
    private boolean flag=true;
    private Object data; //返回具体数据
   public static Result add(Object data){
       Result result = new Result();
       result.data=data;
       return result;
   }
   public static Result error(Object data){
       Result result = new Result();
       result.code=500;
       result.flag=false;
       result.data=data;
       return result;
   }
}
